<%@ page contentType="text/html" pageEncoding="UTF-8"%>
<%@ include file="../header.jsp"%>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>${systemName }</title>
    <link rel="shortcut icon" href="${contextPath}/resources/favicon.ico"> 
    <link href="${contextPath}/resources/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${contextPath}/resources/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <!-- Data Tables -->
    <link href="${contextPath}/resources/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="${contextPath}/resources/css/animate.min.css" rel="stylesheet">
    <link href="${contextPath}/resources/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/plugins/simditor/simditor.css" />
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
       <div class="ibox-content">
        <form action="${contextPath}/system/order/list" class="form-horizontal" name="searchFrom" enctype="multipart/form-data" method="post" id="signupForm"> 
        	${json }
        	<div class="form-group">
                <label class="col-sm-2 control-label">订单ID:</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="orderNo" name="orderNo" value="${order.id }"  >
                </div>
            </div>
        	<div class="form-group">
                <label class="col-sm-2 control-label">订单号:</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="orderNo" name="orderNo" value="${order.orderNo }"  >
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">订单图片:</label>
                <div class="col-sm-10">
                    <img alt="" src="${order.orderImg }" width="200" height="100">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">订单标题:</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="orderTitle" id="orderTitle" value="${order.orderTitle }">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">用户id:</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="userId" id="userId" value="${order.userId }">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">订单状态:</label>
                <div class="col-sm-10">
                	<c:choose>
	             		<c:when test="${order.orderStatus == -1 }"><input type="text" class="form-control"  value="已取消"></c:when>
	             		<c:when test="${order.orderStatus == -2 }"><input type="text" class="form-control"  value="过期取消"></c:when>
	             		<c:when test="${order.orderStatus == 0 }"><input type="text" class="form-control"  value="待付款"></c:when>
	             		<c:when test="${order.orderStatus == 1 }"><input type="text" class="form-control"  value="待收货"></c:when>
	             		<c:when test="${order.orderStatus == 2 }"><input type="text" class="form-control"  value="已发货"></c:when>
	             		<c:when test="${order.orderStatus == 3 }"><input type="text" class="form-control"  value="已完成"></c:when>
	             	</c:choose>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">收货人:</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control"  value="${order.receiver }">
                </div>
            </div>
             <div class="form-group">
                <label class="col-sm-2 control-label">收货人地址:</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control"  value="省:${order.province }  市:${order.city } 区:${order.district } 详细地址:${order.address }">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">收货人邮编:</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control"  value="${order.postcode }">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">收货人电话:</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control"  value="座机:${order.tel }  手机:${order.mobile }">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">总金额=运费+订单金额:</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="costPrice" id="costPrice" value="${order.totalPayee }">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">订单金额= sum(根据商品价格*数量):</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="percentageRate" id="percentageRate" value="${order.orderPayee }">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">运费:</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="amount" min="0" max="9999" id="amount" value="${order.shippingPayee }">
                </div>
            </div>
            
             <label class="col-sm-2 control-label">订单商品详情</label>
           		 <c:forEach items="${order.orderDetails}" var="orderDetail" varStatus="vs">  
            		 <div class="ibox-content" style="border:1px dashed #000 ;">
            		 	 <div class="form-group">
                    <label class="col-sm-2 control-label">商品ID</label>
                    <div class="col-sm-4">
                      	<input type="text"  value="${orderDetail.goodsId }" >
                    </div>
             	</div>
             	<div class="form-group">
                    <label class="col-sm-2 control-label">规格ID</label>
                    <div class="col-sm-4">
                      	<input type="text"  value="${orderDetail.specificationId }" >
                    </div>
             	</div>
             	<div class="form-group">
                    <label class="col-sm-2 control-label">商品名</label>
                    <div class="col-sm-4">
                      	<input type="text"  value="${orderDetail.goodsName }" >
                    </div>
             	</div>
             	<div class="form-group">
                    <label class="col-sm-2 control-label">售卖价</label>
                    <div class="col-sm-4">
                      	<input type="text"  value="${orderDetail.salePrice }" >
                    </div>
             	</div>
             	<div class="form-group">
                    <label class="col-sm-2 control-label">交易价</label>
                    <div class="col-sm-4">
                      	<input type="text"  value="${orderDetail.realPrice }" >
                    </div>
             	</div>
             	<div class="form-group">
                    <label class="col-sm-2 control-label">商品数量</label>
                    <div class="col-sm-4">
                      	<input type="text"  value="${orderDetail.goodsNumber }" >
                    </div>
             	</div>
             	<div class="form-group">
                    <label class="col-sm-2 control-label">市场价</label>
                    <div class="col-sm-4">
                      	<input type="text"  value="${orderDetail.realPrice }" >
                    </div>
             	</div>
             	<div class="form-group">
                    <label class="col-sm-2 control-label">图片</label>
                    <div class="col-sm-4">
                      	<img alt="" src="${orderDetail.thumbnailImage }" width="100" height="100">
                    </div>
             	</div>
             </div>
             </c:forEach>
        </form>
        </div>
    </div>
    <script src="${contextPath}/resources/js/jquery.min.js?v=2.1.4"></script>
    <script src="${contextPath}/resources/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="${contextPath}/resources/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="${contextPath}/resources/js/plugins/validate/messages_zh.min.js"></script>
    <script src="${contextPath}/resources/js/plugins/jeditable/jquery.jeditable.js"></script>
    <script src="${contextPath}/resources/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="${contextPath}/resources/js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <script src="${contextPath}/resources/js/content.min.js?v=1.0.0"></script>
    <script type="text/javascript" src="${contextPath}/resources/js/plugins/simditor/module.js"></script>
    <script type="text/javascript" src="${contextPath}/resources/js/plugins/simditor/uploader.js"></script>
    <script type="text/javascript" src="${contextPath}/resources/js/plugins/simditor/hotkeys.js"></script>
    <script type="text/javascript" src="${contextPath}/resources/js/plugins/simditor/simditor.js"></script>
    <script type="text/javascript">
    </script>
</body>
</html>
